package com.week.tiny_video.dao;

import com.week.tiny_video.pojo.Category;
import com.week.tiny_video.pojo.User;
import com.week.tiny_video.pojo.Video;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface VideoDao extends JpaRepository<Video,Integer> {
    public List<Video> findAllByUser(User user);
    public List<Video> findAllByCategory(Category category);

    public List<Video> findAllByStatus(int status);

    public List<Video> findAllByUserAndStatus(User user,int status);
}
